

div {
    width: 350px;
    padding: 10px;
    margin: 0 auto;
}

h1 {
    font-weight: bold;
    margin: 15px 0;
    font-size: 18px;
}

ul {
    border-bottom: 2px solid #bebebe;
    margin-bottom: 30px;
}
ul:last-child { border: none;}

ul li {
    width: 70px;
    display: inline-block;
    margin: 8px 0;
    padding: 5px;
    height: 20px;
    line-height: 20px;
}

a {
    text-decoration: none;
    color: black;
    display: inline-block;
    border-radius: 5px;
    padding: 3px;
}

ul li a:hover{
    color: white;
}

div h1:first-of-type {
    color: orange;
}
div ul:first-of-type a:hover {
    background-color: orange;
}

div h1:nth-of-type(2) {
    color: green;
}
div ul:nth-of-type(2) a:hover {
    background-color: green;
}

div h1:last-of-type {
    color: pink;
}
div ul:last-of-type a:hover {
    background-color: pink;
}